<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="sys" uri="/sys-tag" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>

<!DOCTYPE html>
<html>
<c:set var="ctx" value="${pageContext.request.contextPath }"/>
<c:set value="${pageContext.request.serverName}" var="serverName"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>博客平台</title>
<script type="text/javascript">
var ctx = "${ctx}";
var serverName = "${serverName}";
</script>
</head>
<u:View basePath="/res-datum/blog" userJS="treeBlog" userCSS="blog" delayLoadJs="false" res="jquery.ztree,jquery.ztree.outlook">
<body style="overflow-y:auto">
	<!-- 左侧菜单栏 -->
	<aside class='left-aside'>
		<div class="m-form" data-part='search'>
			<!-- 搜索下面ul中的菜单 -->
			<input type="search" name='originalName' placeholder="搜索博客类型" id='searchBlogType' data-type='search'><i 
				class='fa fa-search'></i><i class='fa fa-pencil' title='编辑博客类型' onclick="BlogPage.openEditBlogTypeDialog()"></i>
		</div>
		<lui:ajax url="${ctx }/sys/code/findCodeInfoByTypeId" id="findBlogCategoryAjax" data="{'codeTypeId':'blogType','state':1}" 
            contentType="application/x-www-form-urlencoded" onSuccess="BlogPage.findCategorySucc" autoSend="true"/>
        <lui:ajax url="${ctx }/datum/blog/delete" id="deleteBlogByIdAjax" onSuccess="BlogPage.deleteBlogSucc"/>
        <lui:ajax url="${ctx }/datum/blog/article" id="findBlogByCategoryAjax" onSuccess="BlogPage.findBlogByCategorySucc"/>
		<!-- <div id="categoryMenu"></div> -->
		<lui:tree nodeTitleKey="codeInfoName" nodeIdKey="id" ajax="findBlogCategoryAjax" id="categoryTree" showLine="false"
                parentIdKey="ext1" dataStructure="array" nodeNameKey="codeInfoName" nodeChildrenKey="children"
                onCurrentNodeSelected="BlogPage.onSelected" maxLayer="3" style="outlook" selectRootNode="true"/>
	</aside>
	<!-- 内容主体 -->
	<article class="t-main">
		<!-- 操作搜索栏 -->
		<section class='t-oper-bar'>
			<div class="m-form t-uploader">
				<button class="m-btn m-primary" onclick="BlogPage.uploadArticle()">上传文章</button>
			</div>
			<div class="m-form t-search">
				<!-- 搜索下面ul中的菜单 -->
				<input type="text" name='articleName' autofocus="autofocus" placeholder="搜索文章" data-type='search' id='searchArticle'><i 
					class='fa fa-search'></i>
			</div>
		</section>
		<!-- 文章列表 -->
		<section class="t-article-list">
		</section>
	</article>
	<lui:ajax url="${ctx }/datum/blog/signRead" id="signReadAjax" onSuccess="BlogPage.refreshReadCount" silent="true"/>
</body>
</u:View>
</html>